-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Conversation
When we add new event format we'll need to know the event format or room version when parsing events.
Codecov Report
@@ Coverage Diff @@
## develop #4448 +/- ##
==========================================
+ Coverage 73.64% 74.8% +1.16%
==========================================
Files 302 336 +34
Lines 29818 34804 +4986
Branches 4895 5800 +905
==========================================
+ Hits 21960 26036 +4076
- Misses 6426 7149 +723
- Partials 1432 1619 +187 |
Split out from #4403 and address this review comment about making sure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks generally sane, modulo question below
@@ -1659,6 +1664,8 @@ def _persist_auth_tree(self, origin, auth_events, state, event): | |||
create_event = e | |||
break | |||
|
|||
room_version = create_event.content.get("room_version", RoomVersions.V1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible for us to get here without a create_event (if the auth chain is faulty), in which case this will explode rather than failing sensibly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe so, but may as well add a check anyway.
break | ||
|
||
if room_version is None: | ||
# We use this error has that is what |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deep.
When we add new event format we'll need to know the event format or room
version when parsing events.